<%@ page pageEncoding="UTF-8"%>
<%@page import="java.util.ArrayList"%>
<%@page import="com.base.DatabaseObject"%>
<%@page import="com.base.Config"%>
<%@page import="java.math.BigDecimal"%>
<%@page import="com.utils.LOBs"%>
<%@page import="java.sql.Clob"%>
<%
	String sCatId = Utils.getParam(request, "catid", "0");
	String sPage = Utils.getParam(request, "page", "1");
 %>
<%@include file="inc-header.jsp"%>
    <div class="main">
        <div class="item mag0">
	<%@include file="inc-menu.jsp"%>
 <div class="portlet" id="yw0">
<div class="portlet-content">
    <div class="bg_user">
        <ul class="list_style">
            <li class="user-name clearfix">
                <p class="fl">Hi:  
                </p>
            </li>
        </ul>
    </div>
    </div>
</div> 
        </div>
        <div class="bg_gray">
            <ul class="list_style clearfix">
                <li class="fl ">
                    <a class="block" title="" href="ser-gameonline.jsp">
                        Game Online
                    </a>
                </li>
                <li class="fl active">
                    <a class="block" title="" href="ser-gameoff.jsp">
                        Game Offline
                    </a>
                </li>
            </ul>
        </div>
        <div class="sub_list">
            <ul class="list_style clearfix">
                <li class="fl active"><a class="block" title="" href="">Mới</a></li>
                <li class="fl "><a class="block" title="" href="">Hot</a></li>
            </ul>
        </div>
        <div class="item">
            <div class="list-game">
                <ul class="list_style">
                    <li>
                        <table width="100%" cellspacing="0" cellpadding="0" border="0">
        <%
        int currPage = Integer.parseInt(sPage);
		int rowsPerPage = 5;
		ArrayList<DatabaseObject> contentList = contentDAO.getContentListByTypeIndexAll(new BigDecimal(sCatId), currPage, rowsPerPage);
		if (contentList == null || contentList.isEmpty()) {
				contentList = contentDAO.getContentListByTypeIndexAll(new BigDecimal("1067"), 1, 6);
		}
		if (contentList != null && !contentList.isEmpty()) {%>
		<%
			for (DatabaseObject content : contentList) {%>
            <tr>
            <td width="85">
			<a class="data_link" title="" href="#"><img class="img-80-80" src="<%=imagePath + content.getAttribute().get("avatar_image") %>"></a>
            </td>
			<td class="info-data" valign="top">
			<a class="data_link" title=""
			href="ser-clip-detail.jsp?cateid=<%=content.getAttribute().get("category_id")%>&id=<%=content.getAttribute().get("id")%>"><%=content.getAttribute().get("name") %></a>
            <p><strong><span class="cl999">Chia sẻ:</span>50%</strong></p>
            <p><a title="" href="" class="ic-money clf60"><strong>Kinh doanh ngay</strong></a></p>
            </td>
			<%}%>
		</table>
		<%}%>
        </li>
        </ul>
        </div>
        </div>
        
        <div class="portlet" id="yw1">
<p class="mag0 link-top">
    <a title="" href="#">Lên đầu trang</a>
</p>
<%@include file="inc-footter.jsp"%>